﻿using System;
using System.Collections.Generic;

namespace IInject.Registration
{
	public interface IRegistryProvider : IDisposable
	{
		void Clear();
		bool CanResolve(Type type, string key);
		RegistryContext Resolve(Type type, string key);
		IEnumerable<RegistryContext> ResolveAll(Type type, string key);
		void Register(Type fromType, RegistryContext registryContext);
        void RegisterAll(Type fromType, IEnumerable<RegistryContext> contexts);
        void RegisterAll(Type fromType, string key, IEnumerable<RegistryContext> contexts);
		TRegistry Get<TRegistry>() where TRegistry : IRegistry;
		void Add<TRegistry>() where TRegistry : IRegistry, new();
		void Add<TRegistry>(TRegistry registry) where TRegistry : IRegistry;
		void Remove<TRegistry>(TRegistry registry) where TRegistry : IRegistry;
	}
}
